#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
void Reverse(char str[])
{
	int len = strlen(str);
	char* left = str;
	char* right = str + len - 1;
	while (left < right)
	{
		char tmp = *left;
		*left = *right;
		*right = tmp;
		left++;
		right--;
	}
	printf("%s", str);
}
int main()
{
	char arr[10001] = { 0 };
	while (gets(arr))
	{
		Reverse(arr);
	}
	return 0;
}